package com.designpatterns.commandpattern.impl;

import com.designpatterns.commandpattern.Order;
import com.designpatterns.commandpattern.Stock;

public class BuyStock implements Order
{

	private Stock abcStock;

	// 有参构造函数，在实例化BuyStock的同时，给成员变量abcStock也初始化赋值了
	public BuyStock(Stock abcStock)
	{
		this.abcStock = abcStock;
	}

	public void execute()
	{
		abcStock.buy();
	}

}
